﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT082 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagSubItemDefinition U0007;
    private static SwiftTagDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagChoiceDefinition U0011;
    private static SwiftTagSequenceDefinition U0012;
    private static SwiftTagSequenceDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagDefinition U001A;
    private static SwiftTagSubItemDefinition U001B;
    private static SwiftTagDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSequenceDefinition U001E;
    private static SwiftTagSequenceDefinition U001F;
    private static SwiftTagDefinition U007F;
    private static SwiftTagSubItemDefinition U0080;
    private static SwiftTagDefinition U0081;
    private static SwiftTagSubItemDefinition U0082;
    private static SwiftTagDefinition U0083;
    private static SwiftTagSubItemDefinition U0084;
    private static SwiftTagSequenceDefinition U0086;
    private static SwiftTagDefinition U0087;
    private static SwiftTagSubItemDefinition U0088;

    [Description("Sequential section number")]
    public Tag202 SectionNumber_202
    {
      get
      {
        return new Tag202((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0002);
      }
    }

    [Description("Sequential section number")]
    public Tag202 Tag202_SectionNumber
    {
      get
      {
        return this.SectionNumber_202;
      }
    }

    [Description("Total number of sections")]
    public Tag203 TotalSections_203
    {
      get
      {
        return new Tag203((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0004);
      }
    }

    [Description("Total number of sections")]
    public Tag203 Tag203_TotalSections
    {
      get
      {
        return this.TotalSections_203;
      }
    }

    [Description("Date, in GMT, of report generation.")]
    public Tag171 Date_171
    {
      get
      {
        return new Tag171((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0006);
      }
    }

    [Description("Date, in GMT, of report generation.")]
    public Tag171 Tag171_Date
    {
      get
      {
        return this.Date_171;
      }
    }

    [Description("End date and time")]
    public MT082.Tag175 Time_175
    {
      get
      {
        return new MT082.Tag175((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0008);
      }
    }

    [Description("End date and time")]
    public MT082.Tag175 Tag175_Time
    {
      get
      {
        return this.Time_175;
      }
    }

    [Description("Reporting Options")]
    public Tag301 ReportingOptions_301
    {
      get
      {
        return new Tag301((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U000F);
      }
    }

    [Description("Reporting Options")]
    public Tag301 Tag301_ReportingOptions
    {
      get
      {
        return this.ReportingOptions_301;
      }
    }

    [Description("")]
    public MT082.FieldGroup1Class FieldGroup1
    {
      get
      {
        return new MT082.FieldGroup1Class((SwiftElement) this, 0, false);
      }
    }

    [Description("")]
    public MT082.FieldGroup2Class FieldGroup2
    {
      get
      {
        return new MT082.FieldGroup2Class((SwiftElement) this, 0, false);
      }
    }

    [Description("")]
    public MT082.FieldGroup3Class FieldGroup3
    {
      get
      {
        return new MT082.FieldGroup3Class((SwiftElement) this, 0, false);
      }
    }

    public MT082()
      : base(true)
    {
    }

    public MT082(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT082.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT082.MessageDefinition = new SwiftMessageDefinition("MT082", "Undelivered Message Report at a Fixed Hour");
      MT082.U0002 = new SwiftTagDefinition("SectionNumber_202", "Sequential section number");
      MT082.U0002.TagName = "{202:";
      MT082.U0003 = new SwiftTagSubItemDefinition("SectionNumber", " section number");
      MT082.U0002.Elements.Add((SwiftDefinitionElement) MT082.U0003);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U0002);
      MT082.U0004 = new SwiftTagDefinition("TotalSections_203", "Total number of sections");
      MT082.U0004.TagName = "{203:";
      MT082.U0005 = new SwiftTagSubItemDefinition("TotalSections", "Total Sections");
      MT082.U0004.Elements.Add((SwiftDefinitionElement) MT082.U0005);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U0004);
      MT082.U0006 = new SwiftTagDefinition("Date_171", "Date, in GMT, of report generation.");
      MT082.U0006.TagName = "{171:";
      MT082.U0007 = new SwiftTagSubItemDefinition("Date", "Date");
      MT082.U0006.Elements.Add((SwiftDefinitionElement) MT082.U0007);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U0006);
      MT082.U0008 = new SwiftTagDefinition("Time_175", "End date and time");
      MT082.U0008.TagName = "{175:";
      MT082.U000E = new SwiftTagSubItemDefinition("Time", "time");
      MT082.U0008.Elements.Add((SwiftDefinitionElement) MT082.U000E);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U0008);
      MT082.U000F = new SwiftTagDefinition("ReportingOptions_301", "Reporting Options");
      MT082.U000F.TagName = "{301:";
      MT082.U0010 = new SwiftTagSubItemDefinition("ReportingOptions", "Reporting Options");
      MT082.U000F.Elements.Add((SwiftDefinitionElement) MT082.U0010);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U000F);
      MT082.U0011 = new SwiftTagChoiceDefinition("Choice", "");
      MT082.U0011.Multiple = true;
      MT082.U0012 = new SwiftTagSequenceDefinition("FieldGroup1", "");
      MT082.U0013 = new SwiftTagSequenceDefinition("ReportAndMessageUserReference_Sequence", "");
      MT082.U0014 = new SwiftTagDefinition("ReportLine_335", "Report Line");
      MT082.U0014.TagName = "{335:";
      MT082.U0015 = new SwiftTagSubItemDefinition("SenderTime", "report-line");
      MT082.U0014.Elements.Add((SwiftDefinitionElement) MT082.U0015);
      MT082.U0016 = new SwiftTagSubItemDefinition("MessageInputReference", "Message Input Reference");
      MT082.U0014.Elements.Add((SwiftDefinitionElement) MT082.U0016);
      MT082.U0017 = new SwiftTagSubItemDefinition("MessageType", "");
      MT082.U0014.Elements.Add((SwiftDefinitionElement) MT082.U0017);
      MT082.U0018 = new SwiftTagSubItemDefinition("Address", "");
      MT082.U0014.Elements.Add((SwiftDefinitionElement) MT082.U0018);
      MT082.U0019 = new SwiftTagSubItemDefinition("ReceiverTime", "");
      MT082.U0019.Mandatory = false;
      MT082.U0014.Elements.Add((SwiftDefinitionElement) MT082.U0019);
      MT082.U0013.Elements.Add((SwiftDefinitionElement) MT082.U0014);
      MT082.U001A = new SwiftTagDefinition("MessageUserReference_108", "Message User Reference");
      MT082.U001A.TagName = "{108:";
      MT082.U001A.Mandatory = false;
      MT082.U001B = new SwiftTagSubItemDefinition("MessageUserReference", "MessageUserReference");
      MT082.U001A.Elements.Add((SwiftDefinitionElement) MT082.U001B);
      MT082.U0013.Elements.Add((SwiftDefinitionElement) MT082.U001A);
      MT082.U0012.Elements.Add((SwiftDefinitionElement) MT082.U0013);
      MT082.U001C = new SwiftTagDefinition("EmptyReport_1_461", "Empty Report");
      MT082.U001C.TagName = "{461:";
      MT082.U001C.Mandatory = false;
      MT082.U001D = new SwiftTagSubItemDefinition("EmptyReport", "EmptyReport");
      MT082.U001C.Elements.Add((SwiftDefinitionElement) MT082.U001D);
      MT082.U0012.Elements.Add((SwiftDefinitionElement) MT082.U001C);
      MT082.U0011.Elements.Add((SwiftDefinitionElement) MT082.U0012);
      MT082.U001E = new SwiftTagSequenceDefinition("FieldGroup2", "");
      MT082.U001F = new SwiftTagSequenceDefinition("MessageStatusAndServiceCode_Sequence", "");
      MT082.U007F = new SwiftTagDefinition("MessageStatus_431", "Message Status");
      MT082.U007F.TagName = "{431:";
      MT082.U0080 = new SwiftTagSubItemDefinition("MessageStatus", "Message Status");
      MT082.U007F.Elements.Add((SwiftDefinitionElement) MT082.U0080);
      MT082.U001F.Elements.Add((SwiftDefinitionElement) MT082.U007F);
      MT082.U0081 = new SwiftTagDefinition("ServiceCode_103", "Service Code");
      MT082.U0081.TagName = "{103:";
      MT082.U0081.Mandatory = false;
      MT082.U0082 = new SwiftTagSubItemDefinition("ServiceCode", "Service Code");
      MT082.U0081.Elements.Add((SwiftDefinitionElement) MT082.U0082);
      MT082.U001F.Elements.Add((SwiftDefinitionElement) MT082.U0081);
      MT082.U001E.Elements.Add((SwiftDefinitionElement) MT082.U001F);
      MT082.U0083 = new SwiftTagDefinition("EmptyReport_2_461", " EmptyReport");
      MT082.U0083.TagName = "{461:";
      MT082.U0083.Mandatory = false;
      MT082.U0084 = new SwiftTagSubItemDefinition("EmptyReport", "Empty Report");
      MT082.U0083.Elements.Add((SwiftDefinitionElement) MT082.U0084);
      MT082.U001E.Elements.Add((SwiftDefinitionElement) MT082.U0083);
      MT082.U0011.Elements.Add((SwiftDefinitionElement) MT082.U001E);
      MT082.U0086 = new SwiftTagSequenceDefinition("FieldGroup3", "");
      MT082.U0087 = new SwiftTagDefinition("EmptyReport_3_461", "Empty Report");
      MT082.U0087.TagName = "{461:";
      MT082.U0087.Mandatory = false;
      MT082.U0088 = new SwiftTagSubItemDefinition("EmptyReport", "Empty Report");
      MT082.U0087.Elements.Add((SwiftDefinitionElement) MT082.U0088);
      MT082.U0086.Elements.Add((SwiftDefinitionElement) MT082.U0087);
      MT082.U0011.Elements.Add((SwiftDefinitionElement) MT082.U0086);
      MT082.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT082.U0011);
    }

    public class Tag175 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("175", value);
        }
      }

      internal Tag175(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }

    public class FieldGroup1Class : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT082.U0012;
        }
      }

      [Description("")]
      public MT082.FieldGroup1Class.ReportAndMessageUserReference_SequenceClass ReportAndMessageUserReference_Sequence
      {
        get
        {
          return new MT082.FieldGroup1Class.ReportAndMessageUserReference_SequenceClass((SwiftElement) this, 0, false);
        }
      }

      [Description("Empty Report")]
      public Tag461 EmptyReport_1_461
      {
        get
        {
          return new Tag461((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U001C);
        }
      }

      [Description("Empty Report")]
      public Tag461 Tag461_EmptyReport_1
      {
        get
        {
          return this.EmptyReport_1_461;
        }
      }

      internal FieldGroup1Class(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class ReportAndMessageUserReference_SequenceClass : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT082.U0013;
          }
        }

        [Description("Report Line")]
        public Tag335 ReportLine_335
        {
          get
          {
            return new Tag335((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0014);
          }
        }

        [Description("Report Line")]
        public Tag335 Tag335_ReportLine
        {
          get
          {
            return this.ReportLine_335;
          }
        }

        [Description("Message User Reference")]
        public Tag108 MessageUserReference_108
        {
          get
          {
            return new Tag108((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U001A);
          }
        }

        [Description("Message User Reference")]
        public Tag108 Tag108_MessageUserReference
        {
          get
          {
            return this.MessageUserReference_108;
          }
        }

        internal ReportAndMessageUserReference_SequenceClass(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }

    public class FieldGroup2Class : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT082.U001E;
        }
      }

      [Description("")]
      public MT082.FieldGroup2Class.MessageStatusAndServiceCode_SequenceClass MessageStatusAndServiceCode_Sequence
      {
        get
        {
          return new MT082.FieldGroup2Class.MessageStatusAndServiceCode_SequenceClass((SwiftElement) this, 0, false);
        }
      }

      [Description(" EmptyReport")]
      public Tag461 EmptyReport_2_461
      {
        get
        {
          return new Tag461((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0083);
        }
      }

      [Description(" EmptyReport")]
      public Tag461 Tag461_EmptyReport_2
      {
        get
        {
          return this.EmptyReport_2_461;
        }
      }

      internal FieldGroup2Class(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }

      public class MessageStatusAndServiceCode_SequenceClass : SwiftTagSequence
      {
        internal override SwiftDefinitionElement Definition
        {
          get
          {
            return (SwiftDefinitionElement) MT082.U001F;
          }
        }

        [Description("Message Status")]
        public Tag431 MessageStatus_431
        {
          get
          {
            return new Tag431((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U007F);
          }
        }

        [Description("Message Status")]
        public Tag431 Tag431_MessageStatus
        {
          get
          {
            return this.MessageStatus_431;
          }
        }

        [Description("Service Code")]
        public Tag103 ServiceCode_103
        {
          get
          {
            return new Tag103((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0081);
          }
        }

        [Description("Service Code")]
        public Tag103 Tag103_ServiceCode
        {
          get
          {
            return this.ServiceCode_103;
          }
        }

        internal MessageStatusAndServiceCode_SequenceClass(SwiftElement parent, int index, bool createTags)
          : base(parent, index, createTags)
        {
        }
      }
    }

    public class FieldGroup3Class : SwiftTagSequence
    {
      internal override SwiftDefinitionElement Definition
      {
        get
        {
          return (SwiftDefinitionElement) MT082.U0086;
        }
      }

      [Description("Empty Report")]
      public Tag461 EmptyReport_3_461
      {
        get
        {
          return new Tag461((SwiftElement) this, 0, (SwiftDefinitionElement) MT082.U0087);
        }
      }

      [Description("Empty Report")]
      public Tag461 Tag461_EmptyReport_3
      {
        get
        {
          return this.EmptyReport_3_461;
        }
      }

      internal FieldGroup3Class(SwiftElement parent, int index, bool createTags)
        : base(parent, index, createTags)
      {
      }
    }
  }
}
